Test Series - computer fundamental

Test Number 48/95

Q: Programming based on stepwise refinement process.
A. Structural
B. C programming
C. Procedural
D. Fine
Solution: Structured programming is based on the stepwise refinement process-a method of problem decomposition common to all engineering disciplines and the physical, chemical, and biological sciences.
Q: Top-down approach is followed in structural programming.
A. True
B. False
C. none
D. ..
Solution: The statement is true. Structural programming follows the top – down approach. Each module is further divided into sub modules.
Q: A ________ is a directed graph that describes the flow of execution control of the program.
A. Flowchart
B. Flow graph
C. Complexity curve
D. Algorithm
Solution: A flowchart is a directed graph. It simply describes the flow of execution control of the program.
Q: A program should be ________
A. Secure
B. Sequential
C. Ordered
D. Simple
Solution: It is natural to write a program as a sequence of program structures such as sequences, choices and loops.
Q: The following is the syntax for:

      ____(condition)
	action
A. Else
B. Elif
C. If
D. Switch
Solution: The if statement follows that syntax. If is a choice statement. Else is also a choice statement.
Q: Which of the following is a loop statement?
A. IF
B. ELSE
C. WHILE
D. DO
Solution: WHILE is a loop statement.
Syntax : while(condition)
action.
Q: What is the correct syntax of for statement?
A. for(initialization;condition;update)
B. for(initialization,condition,update)
C. for(condition;initialization;update)
D. for(initialization;condition;)
Solution: The correct syntax is : for(initialization;condition;update)
For is another loop statement.
Q: Semicolon is used after :
A. Function definition
B. Function call
C. for loop
D. while loop
Solution: Semicolon is used after function call otherwise it leads to compile-time errors. It shouldn’t be used after definitions. It should also not be used after loops.
Q: The number of values a function can return at a time?
A. 1
B. 0
C. 2
D. more than 2
Solution: A function can return only one value at a time.
Syntax : return (x,12);
Q: Which of the following isn’t a loop statement?
A. for
B. elif
C. while
D. do-while
Solution: The answer is elif. Elif isn’t a loop statement. It is a part of a choice statement.

You Have Score    /10